﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NHibernate.Mapping.ByCode.Conformist;
using NHibernate.Mapping.ByCode;
using Bizbase.Domain.Security;

namespace Bizbase.Domain.Mapping
{
    class RoleMapping : ClassMapping<Role>
    {
        public RoleMapping()
        {
            Id(m => m.Id, map =>
            {
                map.Column("ID");
                map.Generator(Generators.Identity);
            });

            Property(x => x.Name, map =>
            {
                map.Column("NAME");
                map.NotNullable(true);
                map.Length(20);
            });

            Table("BB_ROLE");
        }
    }
}
